package com.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.domain.CompetitionDO;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 比赛管理 Mapper 接口
 * </p>
 * @author 34448
 */
@Mapper
public interface CompetitionMapper extends BaseMapper<CompetitionDO> {

    @Select("SELECT competition_name, COUNT(student_ids) AS participant_count FROM awards GROUP BY competition_name")
    List<Map<String, Object>> countCompetitionParticipants();
}